//定义reducer的初始值
import { GETMOVIELIST } from "../constant/movieConst"
const init = {
  movieList: []
}
export default function countReducer(prevStata = init, action) {
  // console.log(action, 'action');
  const { type, data } = action
  console.log();
  //console.log('data',data.data);
  switch (type) {
    case GETMOVIELIST:
      return {
        ...prevStata,
        movieList: data
      }

  }
  return prevStata
}